﻿CREATE TABLE [dbo].[Fault] (
    [FaultID]               UNIQUEIDENTIFIER NOT NULL,
    [NativeMessageID]       VARCHAR (38)     NULL,
    [ActivityID]            VARCHAR (38)     NULL,
    [Application]           VARCHAR (256)    NOT NULL,
    [Description]           VARCHAR(MAX)   NULL,
    [ErrorType]             VARCHAR (100)    NOT NULL,
    [FailureCategory]       VARCHAR (256)    NOT NULL,
    [FaultCode]             VARCHAR (20)     NOT NULL,
    [FaultDescription]      VARCHAR(MAX)   NULL,
    [FaultSeverity]         INT              NULL,
    [Scope]                 VARCHAR (256)    NOT NULL,
    [ServiceInstanceID]     VARCHAR (38)     NOT NULL,
    [ServiceName]           VARCHAR (256)    NOT NULL,
    [FaultGenerator]        VARCHAR (50)     NULL,
    [MachineName]           VARCHAR (256)    NULL,
    [DateTime]              DATETIME         NULL,
    [ExceptionMessage]      VARCHAR(MAX)   NOT NULL,
    [ExceptionType]         VARCHAR (100)    NOT NULL,
    [ExceptionSource]       VARCHAR (256)    NOT NULL,
    [ExceptionTargetSite]   VARCHAR (256)    NOT NULL,
    [ExceptionStackTrace]   VARCHAR (MAX)   NOT NULL,
    [InnerExceptionMessage] VARCHAR(MAX)   NOT NULL,
    [InsertMessagesFlag]    BIT              NULL,
    [InsertedDate]          DATETIME         NOT NULL, 
    [ItineraryUuid] VARCHAR(40) NULL, 
    [ServiceUuid] VARCHAR(40) NULL, 
    [ItineraryName] NVARCHAR(256) NULL, 
    [ItineraryVersion] NVARCHAR(32) NULL, 
    [ServicePosition] INT NULL
);

